import { request } from 'ice';
import type { BrandItem } from './data';

export const brandApi = {
  // 获取品牌列表
  getList: (data: any) => {
    return request({
      method: "GET",
      params: data,
      url: "/brands/list",
    });
  },

  // 创建品牌
  create: (data: BrandItem) => {
    return request({
      method: "POST",
      data,
      url: "/brands/create",
    });
  },

  // 更新品牌
  update: (data: BrandItem) => {
    return request({
      method: "POST",
      data,
      url: "/brands/update",
    });
  },

  // 删除品牌
  delete: (id: string | number) => {
    return request({
      method: "POST",
      data: { id },
      url: "/brands/delete",
    });
  },
}; 